updating oE new_extra

new_extra

include map.e 
namespace map 
public function new_extra(object the_map_p, integer initial_size_p = 8) 

returns either the supplied map or a new map.

Parameters:
  1. the_map_p : An object, that could be an existing map
  2. initial_size_p : An estimate of how many initial elements will be stored in a new map.
Returns:

A map, If m is an existing map then it is returned otherwise this returns a new empty map.

Comments:

This is used to return a new map if the supplied variable isn't already a map.

Example 1:
map m = new_extra( foo() ) -- If foo() returns a map it is used, otherwise 
                           --  a new map is created. 
Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu